package org.pan.domain.db;

import org.pan.domain.DomainObject;

import javax.persistence.*;

/**
 *  用户头像
 *
 * Created by xiaopan on 2015-11-09.
 */
@Entity
public class CardUserHeaderImage extends DomainObject {

    public enum Query{
        findByCardUserId;
        public String query(){
            return CardUserHeaderImage.class.getSimpleName() + "." + name();
        }
    }

    @Column(name = "imageData")
    @Lob
    private byte[] imageData;

    @ManyToOne
    @JoinColumn(name = "cardUser_id",referencedColumnName = "id",unique = true)
    private CardUser cardUser;

    public byte[] getImageData() {
        return imageData;
    }

    public void setImageData(byte[] imageData) {
        this.imageData = imageData;
    }

    public CardUser getCardUser() {
        return cardUser;
    }

    public void setCardUser(CardUser cardUser) {
        this.cardUser = cardUser;
    }
}
